From 142f8bfae5109248479a257eb9f5ae6bfdb5eacd Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sun, 29 May 2022 13:48:55 +0100 Subject: [PATCH] d/tests/installed-tests: Fail if no tests are found --- debian/tests/installed-tests | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/debian/tests/installed-tests b/debian/tests/installed-tests index 8cf5ea2a89..96d7c0ec94 100755 --- a/debian/tests/installed-tests +++ b/debian/tests/installed-tests @@ -4,6 +4,8 @@ set -eu +namespace=gtk-4.0/ + # Disable gvfs if it happens to be installed. We want to test the built-in # stuff export GIO_USE_VFS=local @@ -12,10 +14,15 @@ export GIO_USE_VOLUME_MONITOR=unix export XDG_RUNTIME_DIR="$AUTOPKGTEST_TMP" export HOME="$AUTOPKGTEST_TMP" -tests=$(gnome-desktop-testing-runner -l gtk-4.0 | +tests=$(gnome-desktop-testing-runner -l "$namespace" | cut -f1 -d' ' | grep -v '^gtk-4.0/gtk/templates.test$') +if [ -z "$tests" ]; then + echo "Error: no installed-tests found matching $namespace" >&2 + exit 1 +fi + exec dbus-run-session -- \ debian/tests/run-with-display $GDK_BACKEND \ debian/tests/run-with-locales \ -- 2.30.2